Skip to content

fix: docs for graphQlTester & constructor for documentSource #1285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

emaarco
Copy link

@emaarco emaarco commented Aug 7, 2025

Closes

Closes #1902

Description

This PR addresses issue #1902 by adding documentation for GraphQlTesterBuilder and enhancing the ResourceDocumentSource class with a new constructor that accepts a single resource.

Changes Made

1. Enhanced ResourceDocumentSource class

  • Added new constructor: ResourceDocumentSource(Resource location) that accepts a single resource location
  • Improved flexibility: Users can now specify a single custom location instead of being limited to the default "graphql/" folder or providing a full list of locations
  • Maintained backward compatibility: All existing constructors remain unchanged

2. Added GraphQlTesterBuilder documentation example

  • Created comprehensive example: Shows how to use GraphQlTesterBuilder with custom document sources
  • Demonstrates key features: Custom document source, error filtering, and response timeout configuration
  • Follows Spring documentation patterns: Uses proper AsciiDoc tags for code inclusion

3. Updated tests

  • Enhanced test coverage: Added tests for the new single resource constructor
  • Maintained existing functionality: All existing tests continue to pass

Additional Notes

This enhancement makes the ResourceDocumentSource more user-friendly by providing a middle ground between the default behavior and full customization. The new constructor is particularly useful for applications that need to specify a custom GraphQL schema location while still using the default file extensions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 7, 2025
@emaarco emaarco changed the title fix: docs for graphQlTester & constructor for documentSource draft: docs for graphQlTester & constructor for documentSource Aug 7, 2025
…r resourceDocumentSource

Signed-off-by: Marco Schaeck <[email protected]>
@emaarco emaarco changed the title draft: docs for graphQlTester & constructor for documentSource fix: docs for graphQlTester & constructor for documentSource Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants